/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Bits;

import java.util.ArrayList;
import java.util.Random;

/**
 *
 * @author Javinel
 */
public class CodingMessage {
    private int cursor=0; //A partir d'où on commence à lire les data
    private ArrayList<Integer> bits;

    public ArrayList<Integer> getBits() {
        return bits;
    }

    public void setBits(ArrayList<Integer> bits) {
        this.bits = bits;
    }
    
    public int getCursor() {
        return cursor;
    }

    public void setCursor(int cursor) {
        this.cursor = cursor;
    }
    
    
    
    public static ArrayList<Integer> generateBits(int total){
        ArrayList<Integer> l=new ArrayList<Integer>();
        
        int n=0;
        for(int i=0;i<total;i++){
            n=(new Random().nextInt((1-0)+1))+0;
            l.add(n); 
        }
        return l;
    }
    
    public CodingMessage(int total){
        ArrayList<Integer> o =CodingMessage.generateBits(total);
        this.bits=o;
    }
    
}
